package com.nf;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        People people=(People) ac.getBean("p1");
        System.out.println(people.getUserName());
        System.out.println(people.getAge());
        System.out.println(people.getMessage());

    }
}
